projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e94a8fd
)
driver/qe: use strncpy instead of strcpy
author
Zhao Qiang
<
[email protected]
>
Tue, 5 May 2015 07:53:33 +0000
(15:53 +0800)
committer
York Sun
<
[email protected]
>
Mon, 3 Aug 2015 19:06:36 +0000
(12:06 -0700)
strncpy is safer than strcpy, use it to instead of strcpy.
Signed-off-by: Zhao Qiang <
[email protected]
>
Reviewed-by: York Sun <
[email protected]
>
drivers/qe/qe.c
patch
|
blob
|
history
diff --git
a/drivers/qe/qe.c
b/drivers/qe/qe.c
index f1df0a419ca206f4b0e626669214b813692da758..08620b23a7180fba914626b471a9de5ed099b90a 100644
(file)
--- a/
drivers/qe/qe.c
+++ b/
drivers/qe/qe.c
@@
-435,7
+435,7
@@
int qe_upload_firmware(const struct qe_firmware *firmware)
* saved microcode information and put in the new.
*/
memset(&qe_firmware_info, 0, sizeof(qe_firmware_info));
- str
cpy(qe_firmware_info.id, (char *)firmware->id
);
+ str
ncpy(qe_firmware_info.id, (char *)firmware->id, 62
);
qe_firmware_info.extended_modes = firmware->extended_modes;
memcpy(qe_firmware_info.vtraps, firmware->vtraps,
sizeof(firmware->vtraps));